package online.shenme.day04.studentManage.dao;


import online.shenme.day04.studentManage.domain.Student;

import java.util.ArrayList;

public interface StudentDao {
    boolean add(Student student);
    boolean delete(String id);
    ArrayList<Student> all();
    default int findIndexByI(String id){
        int index=-1;
        for (int i = 0; i < all().size(); i++) {
            if (id.equals(all().get(i).getId())){
                index=i;
            }
        }
        return index;
    }
}
